home *** CD-ROM | disk | FTP | other *** search
/ Champak 140 / (Vol 140) Sep 19 2011.iso / Games / world-wars.swf / scripts / __Packages / classes / Game_sounds.as < prev    next >
Text File  |  2011-09-19  |  1KB  |  55 lines

  1. class classes.Game_sounds
  2. {
  3.    function Game_sounds()
  4.    {
  5.    }
  6.    function menuSoundtrack()
  7.    {
  8.       if(_global.ARE_SOUNDS == true)
  9.       {
  10.          this._sndTrack.stop();
  11.          this._sndTrack = new Sound();
  12.          this._sndTrack.attachSound("menu1");
  13.          this._sndTrack.start(0,1);
  14.          this._sndTrack.onSoundComplete = mx.utils.Delegate.create(this,this.menuSoundtrack2);
  15.       }
  16.    }
  17.    function menuSoundtrack2()
  18.    {
  19.       if(_global.ARE_SOUNDS == true)
  20.       {
  21.          delete this._sndTrack.onSoundComplete;
  22.          this._sndTrack.stop();
  23.          this._sndTrack = new Sound();
  24.          this._sndTrack.attachSound("menu2");
  25.          this._sndTrack.start(0,99999);
  26.       }
  27.    }
  28.    function gameSoundtrack()
  29.    {
  30.       if(_global.ARE_SOUNDS == true)
  31.       {
  32.          this._sndTrack.stop();
  33.          this._sndTrack = new Sound();
  34.          this._sndTrack.attachSound("gra");
  35.          this._sndTrack.start(0,99999);
  36.       }
  37.    }
  38.    function killSoundtrack()
  39.    {
  40.       this._sndTrack.stop();
  41.    }
  42.    function soundsON(track)
  43.    {
  44.    }
  45.    function playSound(snd)
  46.    {
  47.       if(_global.ARE_SOUNDS == true)
  48.       {
  49.          var _loc2_ = new Sound();
  50.          _loc2_.attachSound(snd);
  51.          _loc2_.start();
  52.       }
  53.    }
  54. }
  55.